package com.huawei.appmarket.support.thirdprovider.appvalidate;

import java.util.ArrayList;
import java.util.List;
import o.cfd;
import o.cfe;
import o.cfg;
import o.cfw;
import o.cvt;
import o.Logger;
import o.CollectCheck;

public class AppValidateInfoManagerIml implements cfg {
    private static final String TAG = "AppValidateInfoManagerIml";

    public void checkAppValidate(List<String> list, List<String> list2, cfd o_cfd) {
        if (CollectCheck.isEmpty((List) list) || CollectCheck.isEmpty((List) list2)) {
            Logger.e(TAG, "checkApp failed, list is empty");
            o_cfd.ˋ(0, 5, null);
        } else if (list.size() != list2.size()) {
            Logger.e(TAG, "checkApp failed, list size is incompatible");
            o_cfd.ˋ(0, 5, null);
        } else {
            cvt newInstance = AppValidateReq.newInstance();
            List arrayList = new ArrayList();
            for (int i = 0; i < list.size(); i++) {
                arrayList.add(new CheckAppInfo((String) list.get(i), (String) list2.get(i)));
            }
            AppListInfo appListInfo = new AppListInfo();
            appListInfo.appList_ = arrayList;
            newInstance.appList_ = appListInfo;
            cfw.ˎ(newInstance, new 1(this, o_cfd));
        }
    }

    private List<cfe> getResults(List<ValidateResult> list) {
        List<cfe> arrayList = new ArrayList();
        for (ValidateResult validateResult : list) {
            cfe o_cfe = new cfe();
            o_cfe.ˏ = validateResult.isLegal_;
            o_cfe.ˊ = validateResult.pkg_;
            arrayList.add(o_cfe);
        }
        return arrayList;
    }
}
